home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / tkern10.zip / INCLUDE\SYS\IOCTL.H < prev    next >
Text File  |  1994-05-14  |  2KB  |  51 lines

  1. /*
  2.  *  This file forms part of "TKERN" - "Troy's Kernel for Windows".
  3.  *
  4.  *  Copyright (C) 1994  Troy Rollo <troy@cbme.unsw.EDU.AU>
  5.  *
  6.  *  This library is free software; you can redistribute it and/or
  7.  *  modify it under the terms of the GNU Library General Public
  8.  *  License as published by the Free Software Foundation; either
  9.  *  version 2 of the License, or (at your option) any later version.
  10.  *
  11.  *  This library is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  *  Library General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU Library General Public
  17.  *  License along with this library; if not, write to the Free
  18.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  */
  20.  
  21. #ifndef __TKIOCTL_H
  22. #define    __TKIOCTL_H
  23.  
  24. #ifndef __TKPROTO
  25. #include <sys/tkproto.h>
  26. #endif
  27.  
  28. #define    TK_IOCTL_PARM_TYPE    0xff000000l
  29. #define    TK_IOCTL_PARM_SIZE    0x00ff0000l
  30. #define    TK_IOCTL_DEV_ID        0x0000ff00l
  31. #define    TK_IOCTL_NUMBER        0x000000ffl
  32. #define    TK_IOCTL_READ_STRING    0x01000000l
  33. #define    TK_IOCTL_WRITE_STRING    0x02000000l
  34. #define    TK_IOCTL_READ_INT    0x04000000l
  35. #define    TK_IOCTL_WRITE_INT    0x08000000l
  36. #define    _IO(x, y)        (((unsigned long) (unsigned char) 'x'<<8) | y)
  37. #define    _IORS(x, y, t)        (TK_IOCTL_READ_STRING | ((unsigned long) sizeof(t) << 16) | ((unsigned long) (unsigned char) 'x'<<8) | y)
  38. #define    _IOWS(x, y, t)        (TK_IOCTL_WRITE_STRING | ((unsigned long) sizeof(t) << 16) | ('x'<<8) | y)
  39. #define    _IORWS(x, y, t)        (TK_IOCTL_READ_STRING | TK_IOCTL_WRITE_STRING | ((unsigned long) sizeof(t) << 16) | ((unsigned long) (unsigned char) 'x'<<8) | y)
  40. #define    _IOR(x, y, t)        (TK_IOCTL_READ_INT | ((unsigned long) sizeof(t) << 16) | ((unsigned long) (unsigned char) 'x'<<8) | y)
  41. #define    _IOW(x, y, t)        (TK_IOCTL_WRITE_INT | ((unsigned long) sizeof(t) << 16) | ((unsigned long) (unsigned char) 'x'<<8) | y)
  42. #define    _IOWRI(x, y, t)        (TK_IOCTL_READ_INT | TK_IOCTL_WRITE_INT | ((unsigned long) sizeof(t) << 16) | ((unsigned long) (unsigned char) 'x'<<8) | y)
  43.  
  44. int    ioctl __TKPROTO((int, long, ...));
  45.  
  46. #ifndef    __TKTTY_H
  47. #include <sys\tty.h>
  48. #endif
  49.  
  50. #endif /* __TKIOCTL_H */
  51.